package com.cms.recursoshumanos.handler;


import com.cms.recursoshumanos.activity.main.MainRecursosHumanosActivity;
import com.cms.recursoshumanos.cache.UserInfoCache;
import com.cms.recursoshumanos.constant.Constant;
import com.cms.recursoshumanos.facade.InfoUserActivityFacade;

public class InfoUserActivityHandler
{

	public InfoUserActivityHandler()
	{
		
	}
	
	public String facadeUserInfo(String username, String password)
	{
		InfoUserActivityFacade user_info_facade = new InfoUserActivityFacade(username, password);
		return user_info_facade.enviarSolicitud();
		
	}
	public String refreshUserInfo (String username, String password)
	{
		return this.facadeUserInfo(username, password);
	}
	public String GetUserInfo (String username,String password)
	{
		if (! UserInfoCache.getInstance().cache_utilizable(0, MainRecursosHumanosActivity.getAppContext())
				|| UserInfoCache.getInstance().getEmpleado() == null)
		{
			return this.facadeUserInfo(username, password);
		}
		else
		{
			return Constant.CODE_OK;
		}
	}
	
	
	
}
